package com.dragon.sso.config.base;

import com.google.common.collect.Sets;
import java.util.Set;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.oauth2.provider.client.BaseClientDetails;
import org.springframework.util.CollectionUtils;

/**
 * @author wangjg
 */
@ConfigurationProperties(prefix = "registration")
@Data
public class Registration{

  /**
   * Client ID for the registration.
   */
  private String clientId;

  /**
   * Client secret of the registration.
   */
  private String clientSecret;

  /**
   * Authorization grant type. May be left blank when using a pre-defined provider.
   */
  private Set<String> authorizedGrantTypes;

  /**
   * Redirect URI. May be left blank when using a pre-defined provider.
   */
  private String redirectUri;

  /**
   * Authorization scopes. When left blank the provider's default scopes, if any, will be used.
   */
  private Set<String> scope;

  private boolean autoScope = false;

  private Set<String> authorities;

  private Set<String> resourceIds;
}
